#include <gtest/gtest.h>
#include <string>
using std::string;

#include <galois/worklet/Dispatcher.h>
#include<galois/worklet/Worklet.h>
#include <galois/cont/ArrayHandle.h>

using galois::worklet::Dispatcher;
using galois::worklet::Worklet;
using galois::cont::ArrayHandle;

TEST(Dispatcher, invoke)
{
  auto worklet = Worklet{};
  auto dispatcher = Dispatcher<Worklet>{};
  ArrayHandle<int> arr;
  arr.Allocate(10);
  arr[0] = 0;
  arr[2] = 2;
  arr[4] = 3;
  arr[6] = 1;

  dispatcher.DoInvoke(arr);
}
